<?
include('../db/koneksi.php');
include('../db/manipulasi_table.php');
include('../db/tes.php');
?>
<script type="text/javascript" src="../jquery/js/jquery-1.9.1.js"></script>
<link rel="stylesheet" href="../jquery/jquery-ui-1.10.3.custom/css/ui-darkness/jquery-ui-1.10.3.custom.css" type="text/css" />
<script type="text/javascript" src="../jquery/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js"></script>
<!---->
<?
function select_options($nama="",$id="",$table="",$value="",$isi=""){
$res=select_table($table);

?>

<div class="col" style="padding-top:10px;float:left;">
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <label class="btn btn-default" style="width:100px;"><?=$nama?></label>
      </span>
      <select name="<?=$id?>" id="<?=$id?>" class="form-control" style="width:300px;">
		<?	$i=0;
			
			while($row=mysql_fetch_array($res))
			{
			?>
			<option value="<?=$row[$value]?>" ><?=$row[$isi]?></option>
			<?
			}
		?>
	  </select>
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
</div>

  <?}?>
<!---->
<?
function input($nama="",$id=""){
?>

<div class="col" style="padding-top:10px;float:left;">
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <label class="btn btn-default" style="width:100px;"><?=$nama?></label>
      </span>
      <input type="text" name="<?=$id?>" id="<?=$id?>" class="form-control" style="width:300px;" placeholder="<?=$nama?>">
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
</div>

  <?}?>
  <?
function auto_input($nama="",$id="",$table="",$field="",$awal=""){
$auto=autonumber($table,$field,$awal);
?>

<div class="col" style="padding-top:10px;float:left;">
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <label class="btn btn-default" style="width:100px;"><?=$nama?></label>
      </span>
      <input type="text" name="<?=$id?>" id="<?=$id?>" value="<?echo $auto;?>" class="form-control" style="width:300px;" placeholder="<?=$nama?>" readonly="true">
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
</div>

  <?}?>
  <!--Function Kalender-->
  <?
function kalender($nama="",$id=""){
?>

<div class="col" style="padding-top:10px;float:left;">
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <label class="btn btn-default" style="width:100px;"><?=$nama?></label>
      </span>
      <input type="text" name="<?=$id?>" id="<?=$id?>" class="form-control" style="width:300px;" placeholder="<?=$nama?>">
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
</div>
<script type="text/javascript" >
 $(function() {
$( "#<?=$id?>" ).datepicker({ dateFormat: "yy-mm-dd" });
});
</script>
  <?}?>
  <!-- function select -->
  <?
function select($nama="",$id="",$data=array()){

?>

<div class="col" style="padding-top:10px;float:left;">
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <label class="btn btn-default" style="width:100px;"><?=$nama?></label>
      </span>
      <select name="<?=$id?>" id="<?=$id?>" class="form-control" style="width:300px;">
		<?	$i=0;
			
			foreach($data as $val)
			{
			
			?>
			
			<option value="<?print_r($val);?>" ><?print_r($val);?></option>
		<?
$i++;		}
		?>
	  </select>
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
</div>
  <?}?>
  <!---->
  <?
function password($nama="",$id=""){
?>

<div class="col" style="padding-top:10px;float:left;">
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <label class="btn btn-default" style="width:100px;"><?=$nama?></label>
      </span>
      <input type="password" name="<?=$id?>" id="<?=$id?>" class="form-control" style="width:300px;" placeholder="<?=$nama?>">
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
  </div>

  <?}?>
    <?
function judul($judul=""){

?>
<div class="panel-heading"><?=$judul?></div>
<?}?>
    <?
function button($jenis="",$nama="",$add=""){
switch($jenis)
{
case 'button':
	$type='button';
break;
case 'submit':
	$type='submit';
break;
case 'reset':
	$type='reset';
break;
default:
	$type='button';

}
?>

     <input type="<?=$type?>" value="<?=$nama?>" <?=$add?> class="btn btn-success" style="width:100px;" >
   

	
<?}?>
<? function form_buka($action=""){
?>
<div class="form" >
<legend>
<form style="width:100%;" action="<?=$action?>" >
<?
} ?>
<? function form_tutup(){
?>
</form>
</legend>
<div style="clear:both;" ></div>
</div>
<?
} ?>
  